const readline = require("readline");
const chalk=require ("chalk")
const ora=require("ora")

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
})

console.log('你好，我是小助手～');
rl.question('请输入你的名字：', name => {
  const spinner=ora("正在欢迎中...").start()
  setTimeout(()=>{
    spinner.succeed(chalk.yellow.bold(`欢迎 ${name}！`));
    rl.close()
  }, 1000)
})